package com.itheima.feign;

import com.itheima.entity.Result;
import com.itheima.entity.StatusCode;
import com.itheima.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@FeignClient("product")
@RequestMapping("/product")
public interface ProductFeign {
    /**
     * 按照商家id更新 星级
     *
     * @param pid
     * @return
     */
    @GetMapping("/updateScore/{pid}")
    public Result updateScore(@PathVariable("pid") Integer pid);

    @GetMapping
    public List<Product> findAll();

    @RequestMapping("/count")
    public Result count();
}
